package com.framework.core.utils;

import android.graphics.Bitmap;

import java.io.ByteArrayOutputStream;

/**
 * @author shenmengchao
 * @version 1.0.0
 * @date 2017/11/1
 * @description
 */

public class BitmapUtil {

    public static byte[] bitmapToByteArray(Bitmap bitmap) {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        bitmap.compress(Bitmap.CompressFormat.PNG, 100, baos);
        return baos.toByteArray();
    }
}
